home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************
- * *
- * CodeA5Globals.c *
- * *
- * A5-world routines for using globals in code resources. For *
- * details, see Technical Note #256. *
- * *
- * Copyright © 1988 Claris Corporation *
- * All Rights Reserved *
- * *
- ************************************************************************/
-
- #include <QuickDraw.h>
- #include <Memory.h>
- #include <OSUtils.h>
- #include "CodeA5Globals.h"
-
-
- /*----------------------------------------------------------------------*/
- void MakeA5World(A5Ref)
- register Handle A5Ref;
- {
- SetHandleSize(A5Ref, A5Size());
- MoveHHi(A5Ref);
- HLock(A5Ref);
- A5Init((Ptr)((*A5Ref) + A5Size() - 32));
- }
-
-
- /*----------------------------------------------------------------------*/
- long SetA5World(A5Ref)
- register Handle A5Ref;
- {
- return(SetA5((long)(*A5Ref) + A5Size() - 32));
- }
-
-
- /*----------------------------------------------------------------------*/
- void RestoreA5World(oldA5, A5Ref)
- register long oldA5;
- register Handle A5Ref;
- {
- # pragma unused(A5Ref)
-
- SetA5(oldA5);
- }
-
-
- /*----------------------------------------------------------------------*/
- void DisposeA5World(A5Ref)
- register Handle A5Ref;
- {
- HUnlock(A5Ref);
- DisposHandle(A5Ref);
- }
-